package com.hrt.common.systemmanager.systemsetting.dict.data;

import com.btcode.db.fieldtype.FieldType;
import com.btcode.orm.model.BaseModel;
import com.btcode.orm.model.Field;
import com.btcode.orm.model.IField;
import java.util.Date;

@SuppressWarnings("unchecked")
public class BcDictDataModel extends BaseModel {

    private static final long serialVersionUID = 1L;


    private static String tableName = "C_BC_DICT_DATA";


    public static IField id = new Field(BcDictDataModel.class, "ID", FieldType.String, false);

    public static IField dictTypeCode = new Field(BcDictDataModel.class, "DICT_TYPE_CODE",
                                                  FieldType.String, true);

    public static IField code = new Field(BcDictDataModel.class, "CODE", FieldType.String, true);

    public static IField value = new Field(BcDictDataModel.class, "VALUE", FieldType.String, false);

    public static IField unit = new Field(BcDictDataModel.class, "UNIT", FieldType.String, false);

    public static IField orderCode = new Field(BcDictDataModel.class, "ORDER_CODE",
                                               FieldType.String, false);

    public static IField createtime = new Field(BcDictDataModel.class, "CREATETIME",
                                                FieldType.DateTime, false);

    public static IField updatetime = new Field(BcDictDataModel.class, "UPDATETIME",
                                                FieldType.DateTime, false);

    public static IField createBy = new Field(BcDictDataModel.class, "CREATE_BY", FieldType.String,
                                              false);

    public static IField updateBy = new Field(BcDictDataModel.class, "UPDATE_BY", FieldType.String,
                                              false);

    public static IField parentId = new Field(BcDictDataModel.class, "PARENT_ID", FieldType.String,
                                              false);

    public static IField isChild = new Field(BcDictDataModel.class, "IS_CHILD", FieldType.String,
                                             false);

    public void setId(String value) {
        setFieldValue(BcDictDataModel.id.getFieldName(), value);
    }

    public String getId() {
        Object value = getFieldValue(BcDictDataModel.id.getFieldName());
        String result = getValueConver().converToString(value);
        return result;
    }

    public void setDictTypeCode(String value) {
        setFieldValue(BcDictDataModel.dictTypeCode.getFieldName(), value);
    }

    public String getDictTypeCode() {
        Object value = getFieldValue(BcDictDataModel.dictTypeCode.getFieldName());
        String result = getValueConver().converToString(value);
        return result;
    }

    public void setCode(String value) {
        setFieldValue(BcDictDataModel.code.getFieldName(), value);
    }

    public String getCode() {
        Object value = getFieldValue(BcDictDataModel.code.getFieldName());
        String result = getValueConver().converToString(value);
        return result;
    }

    public void setValue(String value) {
        setFieldValue(BcDictDataModel.value.getFieldName(), value);
    }

    public String getValue() {
        Object value = getFieldValue(BcDictDataModel.value.getFieldName());
        String result = getValueConver().converToString(value);
        return result;
    }

    public void setUnit(String value) {
        setFieldValue(BcDictDataModel.unit.getFieldName(), value);
    }

    public String getUnit() {
        Object value = getFieldValue(BcDictDataModel.unit.getFieldName());
        String result = getValueConver().converToString(value);
        return result;
    }

    public void setOrderCode(String value) {
        setFieldValue(BcDictDataModel.orderCode.getFieldName(), value);
    }

    public String getOrderCode() {
        Object value = getFieldValue(BcDictDataModel.orderCode.getFieldName());
        String result = getValueConver().converToString(value);
        return result;
    }

    public void setCreatetime(Date value) {
        setFieldValue(BcDictDataModel.createtime.getFieldName(), value);
    }

    public Date getCreatetime() {
        Object value = getFieldValue(BcDictDataModel.createtime.getFieldName());
        Date result = getValueConver().converToDate(value);
        return result;
    }

    public void setUpdatetime(Date value) {
        setFieldValue(BcDictDataModel.updatetime.getFieldName(), value);
    }

    public Date getUpdatetime() {
        Object value = getFieldValue(BcDictDataModel.updatetime.getFieldName());
        Date result = getValueConver().converToDate(value);
        return result;
    }

    public void setCreateBy(String value) {
        setFieldValue(BcDictDataModel.createBy.getFieldName(), value);
    }

    public String getCreateBy() {
        Object value = getFieldValue(BcDictDataModel.createBy.getFieldName());
        String result = getValueConver().converToString(value);
        return result;
    }

    public void setUpdateBy(String value) {
        setFieldValue(BcDictDataModel.updateBy.getFieldName(), value);
    }

    public String getUpdateBy() {
        Object value = getFieldValue(BcDictDataModel.updateBy.getFieldName());
        String result = getValueConver().converToString(value);
        return result;
    }

    public void setParentId(String value) {
        setFieldValue(BcDictDataModel.parentId.getFieldName(), value);
    }

    public String getParentId() {
        Object value = getFieldValue(BcDictDataModel.parentId.getFieldName());
        String result = getValueConver().converToString(value);
        return result;
    }

    public void setIsChild(String value) {
        setFieldValue(BcDictDataModel.isChild.getFieldName(), value);
    }

    public String getIsChild() {
        Object value = getFieldValue(BcDictDataModel.isChild.getFieldName());
        String result = getValueConver().converToString(value);
        return result;
    }


    public String getTableName() {
        return tableName;
    }


    public boolean isNeedCache() {
        return true;
    }

}
